<?php
/*
 * Created on Jan 17, 2013
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
function frontend_channel_pdfs(){
	return 'hello,world, This id PDFs';
}

function frontend_channel_pdfs_init(){
    return request_path();
}

/**
 * @return stdClass
 * - section: string
 * - data: array('options'=>array('global'=>$variables, '[private]'=>$variables))
 *         Private key values:
 *         $privateKey = array(
 *             $region.'.'.$info['view'].'.'.$info['private_key'],
 *             $region.'.'.$info['view'].'.'.$weight,
 *             $region.'.'.$info['view'],
 *             $info['view']
 *         );
 * */
function frontend_channel_pdfs_viewPreset(&$vars, $path){
    
    $re = new stdClass();
    $re->section = 'pdfs';
    $re->data = array();
    
    $re->data['options'] = array();
    
    return $re;
}

function frontend_channel_pdfs_page_build(){
    frontend_attach_clientLibForChannel('pdfs');
}

/**
 * @Description:
 * The parameter [channel or channel/category] should be matched with request_path();
 * The path scan rule is the same with menu path.
 * e.g: "a/b/c" == request_path();
 *      Client library scan order: 
 *      1. "a/b/c"==[channel or channel/category]
 *      2. "a/b"==[channel or channel/category]
 *      3. "a"==[channel or channel/category]
 * The scan process would be break when any one of the client lib settings matched or nothing matched.
 * 
 * HOOK:
 * Be invoke by frontend_attach_clientLibForChannel();
 * */
function frontend_channel_pdfs_clientLibSettings(){
    return array(
        '[channel or channel/category]' => array(
            // the file path is under channel base path "[theme path]/channelLib/sample/[file path][.css]|[.js]"
            'type: css|js' => 'file name prefix', // The real file name rule is "[file name prefix].channel.[js|cssj"  
        ),
        '[channel or channel/category]' => array(
            // the file path is under channel base path "[theme path]/channelLib/sample/[file path][.css]|[.js]"
            'type: css|js' => 'file name prefix', // The real file name rule is "[file name prefix].channel.[js|cssj"  
        )
    );
}